﻿<Window x:Class="LockCrypt.WinOpenDatabase"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:lex="http://schemas.root-project.org/xaml/presentation"
    xmlns:loc="clr-namespace:LockCrypt"
    xmlns:l49="clr-namespace:Lime49;assembly=Lime49"
    Title="{lex:LocText LockCrypt.Core:Strings:Open}" Style="{StaticResource {x:Type Window}}" Icon="/LockCrypt;component/Resources/LockCrypt.ico"
    Height="380" Width="400" MinHeight="200" MinWidth="350" SizeToContent="Height"
    WindowStartupLocation="CenterOwner" x:Name="root"
    l49:WindowService.EscapeClosesWindow="True">
    <Window.CommandBindings>
        <CommandBinding Command="ApplicationCommands.Open" Executed="OpenDatabase" />
        <CommandBinding Command="ApplicationCommands.Close" Executed="CloseWindow" />
    </Window.CommandBindings>
    <DockPanel Margin="6" Grid.IsSharedSizeScope="True">
        <loc:DatabaseSelector x:Name="dbSelector" DockPanel.Dock="Top" DatabaseMode="XML" EncryptionAlgorithm="Aes256" ShowPasswordConfirmation="False" IsSaveDialog="False"/>
        
        <StackPanel DockPanel.Dock="Bottom" Orientation="Horizontal" HorizontalAlignment="Right">
            <Button HorizontalAlignment="Right" MinWidth="70" IsDefault="True" Command="ApplicationCommands.Open" CommandParameter="open" Content="{lex:LocText LockCrypt.Core:Strings:Open}"/>
            <Button HorizontalAlignment="Right" MinWidth="70" Command="ApplicationCommands.Open" CommandParameter="merge" Content="{lex:LocText LockCrypt.Core:Strings:ImportContents}"/>
            <Button HorizontalAlignment="Right" MinWidth="70" IsCancel="True" Command="ApplicationCommands.Close" Content="{lex:LocText LockCrypt.Core:Strings:Cancel}"/>
        </StackPanel>
    </DockPanel>
</Window>
